const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController');

const expressJoi = require('@escook/express-joi');
const { userCheck } = require('../utils/check');
//登录成功
router.post('/login', expressJoi(userCheck), userController.loginController);
//注册成功
router.post('/register', expressJoi(userCheck), userController.reqisterController);
//用户信息查询接口
router.get('/userinfo', userController.userinfoController);
module.exports = router;
